<?php if (!defined('THINK_PATH')) exit();?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>酷学网</title>
<link rel="stylesheet" type="text/css" href="/kx/Public/Css/bdsstyle.css" />
<script type="text/javascript" src="/kx/Public/Js/hm.js"></script>
<script type="text/javascript" src="/kx/Public/Js/analytics.js"></script>
<script type="text/javascript" src="/kx/Public/Js/logger.js"></script>

<link rel="stylesheet" type="text/css" href="/kx/Public/Css/common_s2.css" />
<link rel="stylesheet" type="text/css" href="/kx/Public/Css/libs.css" />
<link rel="stylesheet" type="text/css" href="/kx/Public/Css/jquery-ui-1.css" />
<link rel="stylesheet" type="text/css" href="/kx/Public/Css/select2.css" />

<script type="text/javascript" src="/kx/Public/Js/json2.js"></script>
<script type="text/javascript" src="/kx/Public/Js/jquery-1.js"></script>
<script type="text/javascript" src="/kx/Public/Js/jquery-ui-1.js"></script>
<script type="text/javascript" src="/kx/Public/Js/jquery-ui-timepicker-addon.js"></script>
<script type="text/javascript" src="/kx/Public/Js/select2-min.js"></script>
<script type="text/javascript" src="/kx/Public/Js/public_v2.js"></script>
<script type="text/javascript" src="/kx/Public/Js/jquery-1-8-2-min.js"></script>
<script type="text/javascript" src="/kx/Public/Js/layer-v2.1/layer/layer.js"></script>


<script type="text/javascript" src="/kx/Public/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/kx/Public/ueditor/ueditor.all.min.js"></script>

<script>
    $(function(){
        var ue = UE.getEditor('container',{
                    serverUrl :'<?php echo U('Index/Course/ueditor');?>'
    });

        // var content = '这个是要写的内容';
        // var content ="<?php echo ($data['content']); ?>";
        var content =$('#olddata').val();
        //判断ueditor 编辑器是否创建成功
        ue.addListener("ready", function () {
            // editor准备好之后才可以使用
            ue.setContent(content);

        });
    })

</script>


</head>
<body>

<div id="adcode1044"></div>
<div id="adcode869"></div>
<!-- <div id="downmsg_emessage" class="downmsg_emessage" style="display: none;right:58px;">
    <div id="downmsgBar" class="white">酷学推荐
        <div id="donwmsg_head"></div>
        <a href="javascript://;" class="close" target="_self"></a>
    </div><div id="donwmsg_content">
   
    <div class="fc">
        <a class="fl" target="_blank" href="http://www.koo.cn/zhuanti/cetsf/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">
            <img src="/kx/Public/Images/2016-2-26-1456454488193.jpg" style="margin: 10px 10px 6px 2px;vertical-align: middle;" height="75" width="275">
        </a>
    </div>
        <ul class="fc list-paddingleft-2" style="margin-bottom:20px">
            <li>
                [<a style="color:#FF0000" target="_blank" href="http://www.koo.cn/zhuanti/ss/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">四六级</a>]
                <a target="_blank" href="http://www.koo.cn/zhuanti/ss/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">周思成一笑而过系列之四六级全程通关班</a>
            </li>
            <li>
                [<a style="color:#FF0000" target="_blank" href="http://www.koo.cn/findClass/2-0-1?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">考研</a>]
                <a target="_blank" href="http://www.koo.cn/zhuanti/shiwenwk/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">2017考研英语能力提升班</a>
                <a target="_blank" href="http://www.koo.cn/findClass/2-71-1/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">16考研复试</a>
            </li>
            <li>
                [<a style="color:#FF0000" target="_blank" href="http://www.koo.cn/findClass/6-66-1/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">英美文学</a>]
                <a target="_blank" href="http://www.koo.cn/zhuanti/xixue/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">走进西方文学 品味历史人文第三季</a>
            </li>
            <li>
                [<a style="color:#FF0000" target="_blank" href="http://www.koo.cn/zhuanti/qzz/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">王牌语音课</a>]
                <a target="_blank" href="http://www.koo.cn/zhuanti/qzz/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">摆脱中国式口音：邱邱语音大讲堂</a>
            </li>
            <li>
                [<a style="color:#FF0000" target="_blank" href="http://www.koo.cn/zhuanti/gaokao/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">16高考</a>]
                <a target="_blank" href="http://www.koo.cn/zhuanti/2016gaokao/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">高考百天冲刺</a>
                <a target="_blank" href="http://www.koo.cn/zhuanti/hui/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">李辉英语王牌课程</a>
            </li>
            <li>
                [<a style="color:#FF0000" target="_blank" href="http://www.koo.cn/findClass/8-0-1/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">9.9元</a>]
                <a target="_blank" href="http://www.koo.cn/findClass/8-61-1/?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">PS平面设计从小白到大神</a>
                <a target="_blank" href="http://www.koo.cn/course/4312?hmsr=koo&amp;hmmd=tips&amp;hmpl=&amp;hmkw=&amp;hmci=">职场精英炼成记</a>
            </li>
        </ul>
   
    </div>
</div> -->
<script>
    function loadform(){}
</script>
<script type="text/javascript">
    $(function(){
        $("#head_close").click(function(){
            $.ajax({
                url: "/shopping/removeSession",
                type: 'get',
                dataType:'text',
                success: function(){}
            });
        });

    });
</script>

<div id="header" class="koo_header">
    <div class="w980 matuo fc">
        <div class="logo fl w220 mt8"><a href="<?php echo U('Index/Index/index');?>"><img src="/kx/Public/Images/logo_v2.png" alt="logo" height="49" width="187"></a></div>
        <div class="menus ft16 fl">
            <ul>
                <li><a href="<?php echo U('Index/Index/index');?>" class="  pl0">首页</a></li>
                <li><a href="http://www.koo.cn/findClass/0-0-1/">发现课程</a></li>
                <li><a href="http://www.koo.cn/teacher/0-0-0-0/">发现老师</a></li>
                <li><a href="http://www.koo.cn/userProduct/myProduct/1/horizontal" rel="nofollow">我要听课</a></li>
                <li><a href="<?php echo U('Index/Course/index');?>" class=" ">我要教课</a></li>
                <li><a href="http://bbs.koo.cn/" target="_blank">酷学社区</a></li>
            </ul>
        </div>
        <div class="user-tool fl">
            <!--登录前-->
            <?php if($_SESSION['uid']== ''): ?><ul class="">
                <li>
                    <a class="blue" href="javascript:void(0);" onclick="javascript:$('#userName').focus();return false;">
                        登录
                    </a>
                </li>
                <li class="spacer"></li>
                <li><a href="http://www.koo.cn/head/toRegist?next_page=http%3A%2F%2Fwww.koo.cn%2Fhead%2FtoLogin">注册</a></li>
            </ul>
            <!-- 登录前 E -->
            <!-- 登录后 S-->
            <?php else: ?>
            <dl class="fc">
                <dd class="shopcar">
                    <div class="car-icon has-menu" id="shop_car_top">
                        <span class="icons icons-car-black ft12"></span>
                        <i id="lhb_cart_num" style="position: relative;left: 40px;top: -15px;" >(1)</i>
                    </div>
                    <div class="car-content bg_white" id="buy_list">
                        <p style="display: none;" id="lhb_cart_lt1_h" class="ft12 center pt20 pb20 hide">购物车中还没有课程，赶紧<a href="http://www.koo.cn/findClass/0-0-1/" class="ml5 mr5">选购</a>吧！</p>
                        <div class="car-class ft12" id="lhb_cart_lt1"><ul><li class="fc"><a class="buy_car_img fl" href="http://www.koo.cn/course/5085"><img src="/kx/Public/Images/1449730046486340.jpg" onerror="this.src='http://images.koolearn.com/www/subject/kuxue/img/common/default_im.jpg'" height="35" width="56"></a><h3 class="buy_car_title fl"><a href="http://www.koo.cn/course/5085" title="智鸣哥教你学英语之17考研长难句精讲班(寒假特训)">智鸣哥教你学英语之17考研长难句精讲班(寒假特训)</a></h3><div class="buy_car_pri fr"><span class="yellow fwb">￥399</span><br><a href="javascript:void(0);" onclick="theCartDel(67524588,5085,0)">×</a></div></li></ul><div class="count fc"><div class="text fl">共计1门课程<br>合计:<span class="yellow fwb">399</span>元</div><a class="btn btn_yellow3 fr ft14 mr5" href="http://www.koo.cn/shopping/gotoCart">去购物车结算</a></div></div>
                    </div>
                </dd>
                <dd>
                    <div class="message ">
                        <a href="http://www.koo.cn/customer/toMessage/1"><span class="icons icons-message ft12 mt5"><i id="lhb_msg_num" style="display:none;">(<strong></strong>)</i></span></a>
                    </div>
                </dd>
                <dd class="tools">
                    <div class="has-menu center">
                        <a href="http://www.koo.cn/liveStatistic/getLive">
                        </a><a href="http://www.koo.cn/liveStatistic/getLive"><img class="mt18 img-circular" src="/kx<?php echo ($userInfo['face']); ?>" height="34" width="34"></a>


                    </div>
                    <div class="menu-content ft12">
                        <div class="item"><a href="http://www.koo.cn/liveStatistic/getLive" title="jiajiakatong" class="over-elips">jiajiakatong</a></div>
                        <div class="item"><a href="http://www.koo.cn/userProduct/myProduct/1/horizontal"><em class="icons icons-lister"></em>我要听课</a></div>
                        <div class="item"><a href="<?php echo U('Index/Course/index');?>"><em class="icons icons-compute"></em>我要教课</a></div>
                        <div class="item"><a href="<?php echo U('Index/Customer/index');?>"><em class="icons icons-setting"></em>个人设置</a></div>
                        <div class="item"><a href="<?php echo U('Index/Customer/password');?>"><em class="icons icons-key"></em>密码修改</a></div>
                        <div class="item"><a id="head_close" href="http://login.koo.cn/sso/logout.do?next_page=http://www.koo.cn" target="_self"><em class="icons icons-login-out"></em>退出</a></div>
                    </div>
                </dd>
            </dl><?php endif; ?>
        </div>
        <!-- 登录后 E -->
    </div>
</div>
<!-- form login start -->
<!-- <form id="_loginForm" action="http://login.koo.cn/sso//login.do" method="post" style="display:none">
    <input name="_userName" id="_userName" type="hidden">
    <input name="_password" id="_password" type="hidden">
    <input name="_autoLogin" id="_autoLogin" value="on" type="hidden">
    <input name="_next_page" id="_next_page" type="hidden">
    <input name="_failPage" id="_failPage" value="http://www.koo.cn" type="hidden">
</form> -->
<!-- form login end -->
<!-- 用户登录框 -->

<div sj="mouseover" class="jhl_pop_box  jhl_pop  v3" id="pop_login_v2" style="display:none;">
    <div class="pop_tab">
        <ul>
            <li class="cur"><span>酷学网账号登录</span></li>
            <li><span>新东方网账号登录</span></li>
        </ul>
    </div>
    <div class="pop_ct">
        <!-- 酷学网账号登录  -->
        <form style="display: block;" action="" method="post">
            <dl class="login_box ft14 v3 pt10">
                <dt class="text gray99 "> 用新东方在线www.koolearn.com帐号可以直接登录</dt>
                <div class="warning hide" id="pnameError">
                    <em class="lhb_reg_ico2"></em>
                    <span class="red ft12" id="pnameErrorText"></span>
                </div>
                <dd class="sel ft14">
                    <!--<div class="inputs focus">-->
                    <div class="inputs">
                        <label for="userName" class="pos_r">
                            <em class="ioc-input-user"></em>
                            <em class="ioc-input-close" onclick="$('#puserName').val('');"></em>
                            <input class="input-username" maxlength="50" id="puserName" name="puserName" placeholder="请输入手机号或邮箱或用户名" onfocus="$(this).parents('.inputs').addClass('focus')" onblur="$(this).parents('.inputs').removeClass('focus');valid()" type="text">
                        </label>
                    </div>
                    <div class="infos hide" id="nameError">
                        <em class="lhb_reg_ico2"></em>
                        <span class="red" id="nameErrorText"></span>
                    </div>
                    <div class="infos hide" id="returnError">
                        <em class="lhb_reg_ico2"></em>
                        <span class="red">用户名或密码错误</span>
                    </div>
                </dd>
                <dd>
                    <!--<div class="inputs focus">-->
                    <div class="inputs ">
                        <label for="pwd" class="pos_r">
                            <em class="ioc-input-pwd"></em>
                            <em class="ioc-input-close" onclick="$('#ppassword').val('');"></em>
                            <input class="input-username" maxlength="16" id="ppassword" name="ppassword" placeholder="请输入密码" onfocus="$(this).parents('.inputs').addClass('focus')" onblur="$(this).parents('.inputs').removeClass('focus');valid()" type="password">
                        </label>
                    </div>
                    <div class="infos hide" id="ppwdError">
                        <em class="lhb_reg_ico2"></em>
                        <span class="red" id="ppwdErrorText"></span>
                    </div>
                </dd>
                <dt class="fc autologin">
                    <label><input id="pro" name="autoLogin" value="on" type="checkbox">
                        <span class="ml5 gray2" onclick="">自动登录</span>
                    </label>
                </dt>
                <dt class="mt10">
                    <a class="login-btn" href="#" submit="true" onclick="login()">登录 </a>
                </dt>
                <dt class="freetoreg w300 fc">
                    <a href="http://www.koo.cn/head/toRegist?next_page=http%3A%2F%2Fwww.koo.cn%2Fcustomer%2FtoUserInfo" class="fl">免费注册</a>
                    <a href="http://www.koo.cn/head/getBackPwd" class="blue fr">忘记密码?</a>
                </dt>
            </dl>
        </form>
        <form action="" method="post" style="display: none;" id="xdfForm">

        </form>

        <div class="third_login ft14">
            <div class="gray2 tal">其他合作平台账户登录：</div>
            <a href="javascript:void(0);" class="aoth_wx_v3" onclick="thirdLogin('weixin','add');" target="_self"></a>
            <a href="javascript:void(0);" class="aoth_qq_v3" onclick="thirdLogin('qq','add');" target="_self"></a>
            <a href="javascript:void(0);" class="aoth_weibo_v3" onclick="thirdLogin('sinaweibo','add');" target="_self"></a>
            <a href="javascript:void(0);" class="aoth_baidu_v3" onclick="thirdLogin('baidu','add');" target="_self"></a>
        </div>
    </div>
</div>





<script>
    function wxlogin(){
    //评论
        var d_url=document.location.href;
        var num = d_url.indexOf("/head/toLogin");
        if(num>0){
            d_url=d_url.replace("/head/toLogin","/findClass/0-0-1/");
        }
        var openUrl = "";//弹出窗口的url
        var iWidth=800; //弹出窗口的宽度;
        var iHeight=650; //弹出窗口的高度;
        var iTop = (window.screen.availHeight-30-iHeight)/2; //获得窗口的垂直位置;
        var iLeft = (window.screen.availWidth-10-iWidth)/2; //获得窗口的水平位置;
        window.open("http://login.koo.cn/sso/weixinProxyLogin.do?sceneId=1&next_page="+d_url,"aa","height="+iHeight+", width="+iWidth+", top="+iTop+", left="+iLeft,'toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no');
    }
    // $(function(){
    //     var loginStr="1";
    //     if(loginStr=="1"){
    //         //用户信息定时显示
    //         var msgNum=0;
    //         var msgTime=setInterval(function(){
    //             $.ajax({
    //                 type: "GET",
    //                 url: "/head/getMsg",
    //                 cache:false,
    //                 success: function(data){
    //                     if(data == 'error.user.kicked'){
    //                         window.location='http://www.koo.cn/head/toLogin?errCode=error.login.kicked';
    //                     }
    //                     else if(isNaN(parseInt(data)) || parseInt(data)==0){
    //                         $("#lhb_msg_num").hide();
    //                     }else{
    //                         msgNum=parseInt($("#lhb_msg_num strong").text());
    //                         $("#lhb_msg_num").show();
    //                         $("#lhb_msg_num strong").text(data);
    //                         $("#tool_popmsg").text(data);
    //                         if(msgNum<parseInt(data)){
    //                             $("#tool_msg").show();
    //                         }
    //                     }
    //                 }
    //             });
    //         },60000);

    //         //购物车数量
    //         theCartNum();
    //         //购物车详情列表
    //         theCartDetail();
    //     }
    // })


    function theCartNum(){
    //购物车数量
        $.ajax({
            type: "GET",
            url: "/shopping/cartCourseCount",
            cache:false,
            dataType: "json",
            success: function(data){
                if(isNaN(parseInt(data.result)) || parseInt(data.result)==0){
                    $("#lhb_cart_num").hide();
                }else{
                    $("#lhb_cart_num").show();
                    //$("#lhb_cart_num strong").text(data.result);
                    $("#lhb_cart_num").text("("+data.result+")");
                }
            }
        });
    }
    function theCartDetail(){
    //购物车详情列表
        $.ajax({
            type: "GET",
            url: "/shopping/cartCourseDetail",
            cache:false,
            dataType: "json",
            success: function(data){
                if(data.result.totalCount<=0){
                    $("#lhb_cart_lt1_h").show();
                }else{
                    $('#lhb_cart_lt1').empty();
                    var html = '';
                    $("#lhb_cart_lt1_h").hide();
                    html ="<ul>"
                    for (var i=0;i<data.list.length;i++){
                        html +='<li class="fc">'+
                                '<a class="buy_car_img fl" href="/course/'+ data.list[i].productId +'">'+
                                '<img src="'+ data.list[i].productIconUrlStr +'" onerror=\"this.src=\'http://images.koolearn.com/www/subject/kuxue/img/common/default_im.jpg\'\" width="56" height="35">'+
                                '</a>'+
                                '<h3 class="buy_car_title fl"><a href="/course/'+ data.list[i].productId +'" title="'+ data.list[i].productName +'">'+ data.list[i].productName +'</a></h3>'+
                                '<div class="buy_car_pri fr">'+
                                '<span class="yellow fwb">￥'+ data.list[i].productDiscountPrice +'</span><br>'+
                                '<a href="javascript:void(0);" onclick="theCartDel('+data.list[i].userId+','+data.list[i].productId+','+data.list[i].promotionId+')">×</a>'+
                                '</div>'+
                                '</li>';
                    }
                    html=html+'</ul><div class="count fc">'+
                            '<div class="text fl">'+
                            '共计'+ data.list.length +'门课程<br>'+
                            '合计:<span class="yellow fwb">'+ data.result.totalPrice +'</span>元'+
                            '</div>'+
                            '<a class="btn btn_yellow3 fr ft14 mr5" href="/shopping/gotoCart">去购物车结算</a>'+
                            '</div>';
                    $('#lhb_cart_lt1').html(html);
                }
            }
        });
    }



    function theCartDel(a,b,c){
    //购物车列表删除
        $.ajax({
            type: "GET",
            url: "/shopping/cartCourseRemove?productIds="+ a +"_"+ b +"_"+ c,
            cache:false,
            dataType: "json",
            success: function(data){
                if(data.result.totalCount<=0){
                    $("#lhb_cart_num").hide();
                    $("#buy_list").hide();
                    $("#lhb_cart_lt1_h").show();
                }else{
                    $('#lhb_cart_lt1').empty();
                    var html = '';
                    $("#lhb_cart_num").show();
                    $("#buy_list").show();
                    $("#lhb_cart_lt1_h").hide();
                    html ="<ul>"
                    for (var i=0;i<data.list.length;i++){
                        html +='<li class="fc">'+
                                '<a class="buy_car_img fl" href="/course/'+ data.list[i].productId +'">'+
                                '<img src="'+ data.list[i].productIconUrlStr +'" onerror=\"this.src=\'http://images.koolearn.com/www/subject/kuxue/img/common/default_im.jpg\'\" width="56" height="35">'+
                                '</a>'+
                                '<h3 class="buy_car_title fl"><a href="/course/'+ data.list[i].productId +'" title="'+ data.list[i].productName +'">'+ data.list[i].productName +'</a></h3>'+
                                '<div class="buy_car_pri fr">'+
                                '<span class="yellow fwb">￥'+ data.list[i].productDiscountPrice +'</span><br>'+
                                '<a href="javascript:void(0);" onclick="theCartDel('+data.list[i].userId+','+data.list[i].productId+','+data.list[i].promotionId+')">×</a>'+
                                '</div>'+
                                '</li>';
                    }
                    html=html+'</ul><div class="count fc">'+
                            '<div class="text fl">'+
                            '共计'+ data.list.length +'门课程<br>'+
                            '合计:<span class="yellow fwb">'+ data.result.totalPrice +'</span>元'+
                            '</div>'+
                            '<a class="btn btn_yellow3 fr ft14 mr5" href="/shopping/gotoCart">去购物车结算</a>'+
                            '</div>';
                    $('#lhb_cart_lt1').html(html);
                }
                if($("#cartshopingtable").length>0){
                    location.reload(true) ;
                }
                theCartNum();
            }
        });
    }



    var regUrl = /\/head\/(toRegist|toLogin|getBackPwd)/;
    function login(){
        var userName = $('#puserName').val();
        var password = $('#ppassword').val();

        //手机号
        if(userName == '')
        {
            $('#nameError').show();
            $('#nameErrorText').text('账号不能为空');
            return;
        }
        //密码
        if(password == '')
        {
            $('#ppwdError').show();
            $('#ppwdErrorText').text('密码不能为空');
            return;
        }
        var url = "http://login.koo.cn/sso//quickLogin.do?";
        if ( url.indexOf("?") == -1 ) {
            url += "?type=jsonp";
        }
        else {
            url += "&type=jsonp";
        }
        if($("#autoLogin").is(":checked"))
            url += "&autoLogin=on";

        $.ajax({
            url:url,
            dataType:'jsonp',
            data:{"userName":userName,"password":password},
            cache:false,
            success:function(data){
                if(data == 'success'){
                    $('#_userName').val(userName);
                    $('#_password').val(password);

                    if(regUrl.test(window.location)){
                        //window.location='http://www.koo.cn';
                        $('#_next_page').val('http://www.koo.cn');
                    }
                    else{
                        //window.location.reload();
                        $('#_next_page').val(window.location);
                    }
                    $('#_userName').attr('name','userName');
                    $('#_password').attr('name','password');
                    $('#_next_page').attr('name','next_page');
                    $('#_failPage').attr('name','failPage');
                    //自动登录
                    if($("#autoLogin").is(":checked")){
                        $('#_autoLogin').attr('name','autoLogin');
                    }
                    $('#_loginForm').submit();
                }
                if(data == 'error.login.userNameIsError'){
                    $('#returnError').show();
                    //  $('#pnameErrorText').text('用户名或密码错误');
                }
                if(data == 'error.login.timeInterval'){
                    $('#pnameError').show();
                    $('#pnameErrorText').text('账号在其他地方登录');
                }
                if(data == 'error.login.kicked'){
                    $('#pnameError').show();
                    $('#pnameErrorText').text('帐号在其他地方登录');
                }
                if(data == 'error.login.threepassError'){
                    $('#pnameError').show();
                    $('#pnameErrorText').text('连续三次密码错误，请5分钟后再登录');
                }
            },
            error: function() {

            }
        });
    }
    $('#puserName').on("focus",function(){reset1(1)});
    $('#ppassword').on("focus",function(){reset1(2)});
    function reset1(p){
        if(p == 1){
            $('#nameError').hide();
            $('#pnameError').hide();
            $('#preturnError').hide();
        }
        if(p == 2){
            $('#ppwdError').hide();
        }
    }

    function popLogin(){
    //用户登录框
        dialog({
            width:"460",
            selector:"#pop_login_v2",
            callback:{
                "btn":function(){
                    $(".zmask").on("click",function(){
                        $("#pop_login_v2").hide();
                        $(".zmask").remove();
                    })
                }
            }
        })
    }

    // $(function(){
    //     //登录切换  需要引入 http://images.koolearn.com/www/subject/script/common.js
    //     //popLogin();
    //     $("#pop_login_v2").ontabs(".pop_tab li",".pop_ct   form","cur","mouseover");


    // })

    function thirdLogin(thirdType,type){
        var nextPage=$("input[name='next_page']").val();
        var kooNextPage='http://www.koo.cn/thirdLoginCon/callBack?bind='+type+'&nextPage='+nextPage;
        //var koo_next=encodeURIComponent(kooNextPage);
        var koo_next_url=base64_encode(kooNextPage);
        var url='http://login.koolearn.com/sso//requestToken.do?koo_next_page='+koo_next_url+'&type='+thirdType+'&f=www_third_denglu';
        location.href=url;
    }



    function base64_encode(str){
        var c1, c2, c3;
        var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
        var i = 0, len= str.length, string = '';

        while (i < len){
            c1 = str.charCodeAt(i++) & 0xff;
            if (i == len){
                string += base64EncodeChars.charAt(c1 >> 2);
                string += base64EncodeChars.charAt((c1 & 0x3) << 4);
                string += "==";
                break;
            }
            c2 = str.charCodeAt(i++);
            if (i == len){
                string += base64EncodeChars.charAt(c1 >> 2);
                string += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
                string += base64EncodeChars.charAt((c2 & 0xF) << 2);
                string += "=";
                break;
            }
            c3 = str.charCodeAt(i++);
            string += base64EncodeChars.charAt(c1 >> 2);
            string += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
            string += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
            string += base64EncodeChars.charAt(c3 & 0x3F)
        }
        return string;
    }
</script>
<link rel="stylesheet" type="text/css" href="/kx/Public/Css/ck_base.css" />
<link rel="stylesheet" type="text/css" href="/kx/Public/Css/ck_headmaster.css" />
<link rel="stylesheet" type="text/css" href="/kx/Public/Css/jquery.Jcrop.min.css" media="all">
<link rel="stylesheet" type="text/css" href="/kx/Public/Js/uploadify-v3.1/uploadify.css" media="all">
<script type="text/javascript" src="/kx/Public/Js/uploadify-v3.1/jquery.uploadify-3.1.min.js"></script>
<script type="text/javascript" src="/kx/Public/Js/jquery.Jcrop.min.js"></script>
<script type="text/javascript" src="/kx/Public/Js/ThinkBox/jquery.ThinkBox.js"></script>
<link rel="stylesheet" type="text/css" href="/kx/Public/Js/ThinkBox/css/ThinkBox.css" media="all">
<style type="text/css">

.cf:before,.cf:after {
    display: table;
    content: "";
    line-height: 0;
}
.cf:after {
    clear: both;
}
.cf {
    *zoom: 1;
}
.upload-area {
    position: relative;
    float: left;
    margin-right: 30px;
    width: 200px;
    height: 200px;
    background-color: #F5F5F5;
    border: 2px solid #E1E1E1;
}
.upload-area .file-tips {
    position: absolute;
    top: 90px;
    left: 0;
    padding: 0 15px;
    width: 170px;
    line-height: 1.4;
    font-size: 12px;
    color: #A8A8A3;
    text-align: center;
}
.userup-icon {
    display: inline-block;
    margin-right: 3px;
    width: 16px;
    height: 16px;
    vertical-align: -2px;
    background: url("/kx/Public/Images/userup_icon.png") no-repeat;
}
.uploadify-button {
    line-height: 120px!important;
    text-align: center;
}
.preview-area {
    float: left;
}
.tcrop {
    clear: right;
    font-size: 14px;
    font-weight: bold;
}

.crop {
    background: url("/kx<?php echo ($courseInfo['teacherface']); ?>") no-repeat scroll center center #EEEEEE;
    background-size: 100px 100px;
    float: left;
    margin-bottom: 20px;
    margin-top: 10px;
    overflow: hidden;
}
.crop100 {
    height: 100px;
    width: 100px;
}
.crop60 {
    height: 60px;
    margin-left: 20px;
    width: 60px;
}
 .save-pic {
    clear: left;
    margin-right: 20px;
}
.uppic-btn {
    background-color: #348FD4;
    color: #FFFFFF;
    display: block;
    float: left;
    font-size: 16px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    vertical-align: middle;
    width: 89px;
}
.preview {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 11;
    width: 200px;
    height: 200px;
    overflow: hidden;
    background:#fff;
    display: none;
}


.cf1:before,.cf1:after {
    display: table;
    content: "";
    line-height: 0;
}
.cf1:after {
    clear: both;
}
.cf1 {
    *zoom: 1;
}
.upload-area1 {
    position: relative;
    float: left;
    margin-right: 30px;
    width: 315px;
    height: 200px;
    background-color: #F5F5F5;
    border: 2px solid #E1E1E1;
}
.upload-area1 .file-tips1 {
    position: absolute;
    top: 90px;
    left: 0;
    padding: 0 15px;
    width: 280px;
    line-height: 1.4;
    font-size: 12px;
    color: #A8A8A3;
    text-align: center;
}
.userup-icon1 {
    display: inline-block;
    margin-right: 3px;
    width: 16px;
    height: 16px;
    vertical-align: -2px;
    background: url("/kx/Public/Images/userup_icon.png") no-repeat;
}
.uploadify-button1 {
    line-height: 120px!important;
    text-align: center;
}
.preview-area1 {
    float: left;
}
.tcrop {
    clear: right;
    font-size: 14px;
    font-weight: bold;
}
.crop1 {
    background: url("/kx<?php echo ($courseInfo['picture']); ?>") no-repeat scroll center center #EEEEEE;
    background-size: 100px 100px;
    float: left;
    margin-bottom: 20px;
    margin-top: 10px;
    overflow: hidden;
}
.crop1001 {
    height: 92px;
    width: 147px;
}
.crop601 {
    height: 60px;
    margin-left: 20px;
    width: 60px;
}
 .save-pic1 {
    clear: left;
    margin-right: 20px;
}
.uppic-btn1 {
    background-color: #348FD4;
    color: #FFFFFF;
    display: block;
    float: left;
    font-size: 16px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    vertical-align: middle;
    width: 89px;
}
.preview1 {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 11;
    width: 200px;
    height: 200px;
    overflow: hidden;
    background:#fff;
    display: none;
}
</style>

    <div class="postContent">
        <!-- =S 发布页步骤 -->
        <!-- 第一步postStep_1 第二步postStep_2 第三步postStep_3 第四步postStep_4 -->
        <dl class="postStep_2">
            <dt>发布课程</dt>
            <!-- <dd class="i1">选择分类</dd>
            <dd class="i2">填写课程信息</dd>
            <dd class="i3">发布成功</dd> -->
        </dl>
        <!-- =E 发布页步骤 -->

        <div class="postFormContent clearfix">
            <div class="pt20 pl20 pr20 pb10">
                <p class="ck_notice pt10 f12"><img alt="" src="http://res.ckimg.com/sites/www/v2/images/public/ico_warning_16x16.png" class="iPic"> 
                课程在有人购买后，结束时间不可调近，担保期不可调短。</p>
            </div>
            <form action="" class="pt10" method="post" id="create_course_basic_form">
            <input type="hidden" name="courseid" value="<?php echo ($courseInfo['courseid']); ?>" id="courseid" />
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>课程分类：</span>
                    </div>
                    <div class="form_field">
                        <div class="form_field" >
                                <dd >
                                    <select name="categoryId">
                                        <?php if(is_array($category)): foreach($category as $key=>$vo): if($vo['id'] == $courseInfo['categoryid']): ?><option value="<?php echo ($vo['id']); ?>" selected><?php echo ($vo['categoryname']); ?></option>
                                            <?php else: ?> 
                                                <option value="<?php echo ($vo['id']); ?>" ><?php echo ($vo['categoryname']); ?></option><?php endif; endforeach; endif; ?>
                                    </select>
                                </dd>      
                           <!--  <input type="text" class="form_text fl" style="width:200px" id="category" value="" name="name"> -->
                            <span class="fl" id="form_tips_name"></span>
                        </div>
                    </div>
                </div>
                <input type="hidden" name="cateid" value="72365470228938752" id="cateid" />
                <!-- 个性化学习 formItem S-->
                                <!-- 个性化学习 formItem E-->
                <!-- =E formItem -->
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>课程名称：</span>
                    </div>
                    <div class="form_field">
                        
                        <input type="text" class="form_text fl" style="width:390px" id="name" value="<?php echo ($courseInfo['coursename']); ?>" name="name" placeholder="限定2-30个汉字或者4-60字符" >
                        <span class="fl" id="form_tips_name"></span>
                    </div>
                </div>
                <!-- =E formItem -->
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>课程价格：</span>
                    </div>
                    <div class="form_field">
                        <input type="text" class="form_text fl" id="cost" value="<?php echo ($courseInfo['price']); ?>" name="cost" placeholder="只允许格式为0.00的数字">
                        <span class="ml5 fl">元</span>
                        <span class="fl" id="form_tips_cost"></span>
                    </div>
                </div>
                <!-- =E formItem -->
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>总课时：</span>
                    </div>
                    <div class="form_field">
                        <span class="pr fl">
                            <input type="text" class="form_text fl" id="hours" value="<?php echo ($courseInfo['lessonnum']); ?>" name="hours" placeholder="请填写1-1000的整数">
                            <span class="ml5 fl">课时</span>
                            <span class="fl" id="form_tips_hours"></span>
                        </span> 
                        <p class="form_des cl pt10">请填写预计课程全部讲完要花费的课时数，注意与学习有效期相符合。
                        <!-- <a target="_blank" href="http://www.chuanke.com/?mod=help&do=showInfo&SID=211&HID=20&PID=343">了解详情&gt;&gt;</a> -->
                        </p>                
                    </div>
                </div>
                <!-- =E formItem -->
                <!-- <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>结束时间：</span>
                    </div>
                    <div class="form_field"  id="payendtimeTips">
                        <span class="pr fl">
                            <input type="text" class="form_text fl" value="" id="payendtime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d',maxDate:'{%y+5}-%M-%d'})" name="payendtime">
                            <span class="fl" id="form_tips_payendtime"></span>
                        </span> 
                        <input type="date" name="endTime">              
                        <p class="form_des cl pt10">课程结束后会自动停售。
                        
                        </p>
                    </div>
                </div> -->
                <!-- =E formItem -->
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>学习有效期：</span>
                    </div>
                    <div class="form_field">
                        <span class="pr fl">
                            <input type="text" class="form_text fl" id="expiretime" value="<?php echo ($courseInfo['expiretime']); ?>" name="expiretime" placeholder="请填写1-99的整数">
                            <span class="ml5 fl">天</span>
                            <span class="fl" id="form_tips_expiretime"></span>
                        </span> 
                        <p class="form_des cl pt10">学生购买之日起可学习的时间段，防止临近课程到期时间购买的学生学习时间不足，请设置学习有效期长度要保证能学完全部课程。<a target="_blank" href="http://www.chuanke.com/?mod=help&act=index&do=showInfo&SID=211&HID=20&PID=376">了解详情&gt;&gt;</a></p>              
                    </div>
                </div>
                <!-- =E formItem -->
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>购买人数限制：</span>
                    </div>
                    <div class="form_field"  id="studentlimitTips">
                        <span class="pr fl">
                            <input type="text" class="form_text fl" value="<?php echo ($courseInfo['studentnum']); ?>" id="studentlimit" name="studentlimit" placeholder="请填写1-999的整数"> 
                            <span class="ml5 fl">人</span>
                            <span class="fl" id="form_tips_studentlimit"></span>
                        </span>                     
                    </div>
                </div>
                <!-- =E formItem -->
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>教室容量：</span>
                    </div>
                    <div class="form_field">
                        <input type="text" class="form_text fl" id="classroomcapacity" value="<?php echo ($courseInfo['maxstudentnum']); ?>" name="classroomcapacity" placeholder="请填写1-200的整数"> 
                        <span class="ml5 fl">人</span>
                        <span class="fl" id="form_tips_classroomcapacity"></span>
                        <p class="form_des cl pt10">直播课教室内可容纳的同时在线听课人数，最多支持200人。<a target="_blank" href="http://www.chuanke.com/?mod=help&do=showInfo&SID=211&HID=20&PID=345">了解详情&gt;&gt;</a></p>
                    </div>
                </div>
                <!-- =E formItem -->
               <!--  <div class="formItem">
                    <div class="form_label">
                        <span>难度：</span>
                    </div>
                    <div class="form_field">
                        <label class="mr10">
                            <input type="radio" name="degree" value="2">
                            <span>初级</span>
                        </label>
                        <label class="mr10">
                            <input type="radio" name="degree" value="3">
                            <span>中级</span>
                        </label>
                        <label class="mr10">
                            <input type="radio" name="degree" value="4">
                            <span>高级</span>
                        </label>
                        <p class="form_des cl pt10">选择难度，使学生更快更直观了解您的课程难度，快速定位您到的课程并完成购买。<a target="_blank" href="http://www.chuanke.com/?mod=help&amp;do=showInfo&amp;SID=211&amp;HID=20&amp;PID=394">了解详情&gt;&gt;</a></p>
                    </div>
                </div> -->
                <!-- =E formItem -->
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>  
                        <span>适合人群：</span>
                    </div>
                    <div class="form_field">
                        <span class="fl pr">
                            <input type="text" class="form_text fl" prompt="示例：中小学生、爱好者、高级白领" id="people" name="people" value="<?php echo ($courseInfo['people']); ?>" style="width:750px">
                            <span id="form_tips_people"></span>
                        </span>
                    </div>
                </div>
                <!-- =E formItem -->
               <!--  <div class="formItem">
                    <div class="form_label">
                        <span>学到什么：</span>
                    </div>
                    <div class="form_field">
                        <div style="width:757px" class="pr">
                            <textarea class="textarea500 fl" style="height:60px" prompt="掌握的技能、学到的知识点" id="knowledge" name="knowledge"></textarea>
                            <span id="form_tips_knowledge"></span>
                        </div>
                    </div>
                </div> -->
                <!-- =E formItem -->
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>授课老师头像：</span>
                    </div>
                    <div class="form_field">
                    <div class="clearfix">
                       <!--  <span class="teacher-pic">
                            <img src="./Images/90f46d6963726f736b797065a502.jpg" val="" width="126" height="126" alt="" id="teacherphoto1">
                            <style>
                                #uploadTeacher1{position:absolute;left:0;bottom:0px;}
                                #uploadTeacher1 .swfupload{left:0;top:0;} 
                                #uploadTeacher1 .uploadify3-button{z-index:0;}
                                #uploadTeacher2{position:absolute;left:0;bottom:0px;}
                                #uploadTeacher2 .swfupload{left:0;top:0;} 
                                #uploadTeacher2 .uploadify3-button{z-index:0;} 
                                #uploadTeacher3{position:absolute;left:0;bottom:0px;}
                                #uploadTeacher3 .swfupload{left:0;top:0;} 
                                #uploadTeacher3 .uploadify3-button{z-index:0;}   
                                #uploadTeacher4{position:absolute;left:0;bottom:0px;}
                                #uploadTeacher4 .swfupload{left:0;top:0;} 
                                #uploadTeacher4 .uploadify3-button{z-index:0;} 
                                #uploadTeacher5{position:absolute;left:0;bottom:0px;}
                                #uploadTeacher5 .swfupload{left:0;top:0;} 
                                #uploadTeacher5 .uploadify3-button{z-index:0;}                     
                            </style>
                            <span class="pic-link" id="uploadTeacher1">上传头像</span>
                        </span> -->
                       <!--  <form action="" method="post" id="pic" class=" cf"> -->
                        <div class="upload-area">
                            <input type="file" id="user-pic">
                            <div class="file-tips">支持JPG,PNG,GIF，图片小于1MB，尺寸不小于100*100,真实高清头像更受欢迎！</div>
                            <div class="preview hidden" id="preview-hidden"></div>
                        </div>

                        <div class="preview-area">
                            <input type="hidden" id="isteacher" name="isteacher" />
                            <input type="hidden" id="x" name="x" />
                            <input type="hidden" id="y" name="y" />
                            <input type="hidden" id="w" name="w" />
                            <input type="hidden" id="h" name="h" />
                            <input type="hidden" id='img_src' name='src' value="" />
                            <div class="tcrop">头像预览</div>
                            <div class="crop crop100" style="overflow:hidden;margin-bottom:20px"><img id="crop-preview-100" src="" alt=""></div>   
                            <a class="uppic-btn reupload-img" href="javascript:$('#user-pic').uploadify('cancel','*');" style="background-color: #348FD4;display:block;text-align: center;color: #FFFFFF;clear:left">重新上传</a>
                        </div>
                       <!--  </form> -->
                       <!--  <div class="teacher-info">
                            <div class="clearfix  info-top">
                                <div class="pr fl">
                                    <input type="text" class="form_text fl" prompt="姓名" id="teachername1" name="teachername1">
                                    <span id="form_tips_teachername1"></span>
                                </div>
                                <a href="javascript:;" class="fr f12" id="empty">全部清空</a>
                            </div>
                            <div class="pr mt10"  id="TeacherBriefTips">
                                <textarea  prompt="教育经历、工作经历、教学风格等" name="teacherbrief1" class="fl" id="teacherbrief1"></textarea>
                                <span id="form_tips_teacherbrief1"></span>
                            </div>
                        </div> -->
                    </div>
                     <!-- =E formItem -->
                    
                   <!--  <div class="clearfix mt20" style="display: none;" id="teacher2">
                        <a href="javascript:;" class="teacher-pic">
                            <img src="http://res.ckimg.com/sites/www/v2/images/public/90f46d6963726f736b797065a502.jpg" width="126" height="126" alt="" id="teacherphoto2" val="">
                            <span href="javascript:;" class="pic-link uploadTeacher" id="uploadTeacher2">上传头像</span>
                        </a>
                        <div class="teacher-info">
                            <div class="clearfix">
                                <div class="pr fl">
                                    <input type="text" class="form_text fl" prompt="姓名" id="teachername2" name="teachername2">
                                    <span id="form_tips_teachername2"></span>
                                </div>
                                <a href="javascript:;" num="2" class="fr f12 delteacher">删除</a>
                            </div>
                            <div class="pr mt10">
                                <textarea name="teacherbrief2" id="teacherbrief2"></textarea>
                                <span id="form_tips_teacherbrief2"></span>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix mt20" style="display: none;" id="teacher3">
                        <a href="javascript:;" class="teacher-pic">
                            <img src="http://res.ckimg.com/sites/www/v2/images/public/90f46d6963726f736b797065a502.jpg" width="126" height="126" alt="" id="teacherphoto3" val="">  
                            <span href="javascript:;" class="pic-link" id="uploadTeacher3">上传头像</span>
                        </a>
                        <div class="teacher-info">
                            <div class="clearfix">
                                <div class="pr fl">
                                    <input type="text" class="form_text fl" prompt="姓名" id="teachername3" name="teachername3">
                                    <span id="form_tips_teachername3"></span>
                                </div>
                                <a href="javascript:;" num="3" class="fr f12 delteacher">删除</a>
                            </div>
                            <div class="pr mt10">
                                <textarea name="teacherbrief3" id="teacherbrief3"></textarea>
                                <span id="form_tips_teacherbrief3"></span>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix mt20" style="display: none;" id="teacher4">
                        <a href="javascript:;" class="teacher-pic">
                            <img src="http://res.ckimg.com/sites/www/v2/images/public/90f46d6963726f736b797065a502.jpg" width="126" height="126" alt="" id="teacherphoto4"  val=""> 
                            <span href="javascript:;" class="pic-link" id="uploadTeacher4">上传头像</span>
                        </a>
                        <div class="teacher-info">
                            <div class="clearfix">
                                <div class="pr fl">
                                    <input type="text" class="form_text" prompt="姓名" id="teachername4" name="teachername4">
                                    <span id="form_tips_teachername4"></span>
                                </div>
                                <a href="javascript:;" num="4" class="fr f12 delteacher">删除</a>
                            </div>
                            <div class="pr mt10">
                                <textarea name="teacherbrief4" id="teacherbrief4"></textarea>
                                <span id="form_tips_teacherbrief4"></span>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix mt20" style="display: none;" id="teacher5">
                        <a href="javascript:;" class="teacher-pic">
                            <img src="http://res.ckimg.com/sites/www/v2/images/public/90f46d6963726f736b797065a502.jpg" width="126" height="126" alt="" id="teacherphoto5" val="">  
                            <span href="javascript:;" class="pic-link" id="uploadTeacher5">上传头像</span>
                        </a>
                        <div class="teacher-info">
                            <div class="clearfix">
                                <div class="pr fl">
                                    <input type="text" class="form_text" prompt="姓名" id="teachername5" name="teachername5">
                                    <span id="form_tips_teachername5"></span>
                                </div>
                                <a href="javascript:;" num="5" class="fr f12 delteacher">删除</a>
                            </div>
                            <div class="pr mt10">
                                <textarea name="teacherbrief5" id="teacherbrief5"></textarea>
                                <span id="form_tips_teacherbrief5"></span>
                            </div>
                        </div>
                    </div>
                    <div class="cb pt5">
                        <a href="javascript:;" class="link-add clearfix" num="1" id="addteacher">
                            <i></i>
                             添加老师
                        </a>
                    </div> -->
                </div>
            </div>
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>老师姓名：</span>
                    </div>
                    <div class="form_field" >
                        <div class="pr" >
                            <input type="text" class="form_text fl" prompt="姓名" id="teachername1" name="teachername" value="<?php echo ($courseInfo['teachername']); ?>">
                           <!--  <span class="fr form_des pt10">已输入 <em id="briefCount">0</em>/最多输入 20000</span>
                            <span id="autoSaveTips" style="display:none" class="clear fr form_des pt10">编辑框信息已于<em></em>自动保存 <a id="autoSaveBrief" href="javascript:;">读取存档</a></span> -->
                        </div>
                    </div>
                </div>
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>个人技能：</span>
                    </div>
                    <div class="form_field" >
                        <div class="pr" >
                            <input type="text" class="form_text fl" prompt="专长" id="" value="<?php echo ($courseInfo['skill']); ?>" name="skill" style="width:750px" placeholder="每个技能之间请以逗号隔开">
                           <!--  <span class="fr form_des pt10">已输入 <em id="briefCount">0</em>/最多输入 20000</span>
                            <span id="autoSaveTips" style="display:none" class="clear fr form_des pt10">编辑框信息已于<em></em>自动保存 <a id="autoSaveBrief" href="javascript:;">读取存档</a></span> -->
                        </div>
                    </div>
                </div>
                    
                 <!--    <div class="clearfix  info-top">
                                <div class="pr fl">
                                    <input type="text" class="form_text fl" prompt="姓名" id="teachername1" name="teachername1">
                                    <span id="form_tips_teachername1"></span>
                                </div>
                                <a href="javascript:;" class="fr f12" id="empty">全部清空</a>
                            </div>
                            <div class="pr mt10"  id="TeacherBriefTips">
                                <textarea  prompt="教育经历、工作经历、教学风格等" name="teacherbrief1" class="fl" id="teacherbrief1"></textarea>
                                <span id="form_tips_teacherbrief1"></span>
                            </div> -->


                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>老师简介：</span>
                    </div>
                    <div class="form_field" >
                        <div class="pr" >
                            <textarea class="textarea500 fl"  name="brief" id="brief" cols="" rows="" style="height:100px;width:750px"><?php echo ($courseInfo['brief']); ?></textarea>
                            <span class="fl" id="form_tips_brief"></span>
                           <!--  <span class="fr form_des pt10">已输入 <em id="briefCount">0</em>/最多输入 20000</span>
                            <span id="autoSaveTips" style="display:none" class="clear fr form_des pt10">编辑框信息已于<em></em>自动保存 <a id="autoSaveBrief" href="javascript:;">读取存档</a></span> -->
                        </div>
                    </div>
                </div>
                <!-- =E formItem -->
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>课程详情：</span>
                    </div>
                    <div class="form_field">
                    <!--    <div class="pr" >
                            <textarea class="textarea500 fl" name="brief" id="brief" cols="" rows=""></textarea>
                            <span class="fl" id="form_tips_brief"></span>
                            <span class="fr form_des pt10">已输入 <em id="briefCount">0</em>/最多输入 20000</span>
                            <span id="autoSaveTips" style="display:none" class="clear fr form_des pt10">编辑框信息已于<em></em>自动保存 <a id="autoSaveBrief" href="javascript:;">读取存档</a></span>
                        </div> -->
                     
                        <script id="container" name="content" type="text/plain" ></script>
                        <textarea name="" id="olddata" cols="30" rows="10" style="display:none"><?php echo ($courseInfo['detail']); ?></textarea>
                    </div>
                </div>
                <!-- =E formItem -->
                
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>课程封面：</span>
                    </div>
                    <div class="form_field">
                    <!--  <form action="" method="post" id="pic" class=" cf1"> -->
                         <div class="upload-area1" >
                            <input type="file" id="user-pic1" >
                            <div class="file-tips1">支持JPG,PNG,GIF，图片小于1MB，尺寸不小于145*92,真实高清封面更受欢迎！</div>
                            <div class="preview1 hidden1" id="preview-hidden1"></div>
                        </div>

                        <div class="preview-area1">
                            <input type="hidden" id="ispicture" name="ispicture" />
                            <input type="hidden" id="x1" name="x1" />
                            <input type="hidden" id="y1" name="y1" />
                            <input type="hidden" id="w1" name="w1" />
                            <input type="hidden" id="h1" name="h1" />
                            <input type="hidden" id='img_src1' value="" name='src1'/>
                            <div class="tcrop1">封面预览</div>

                            <div class="crop1 crop1001" style="overflow:hidden;margin-bottom: 20px;">
                                <img id="crop-preview-1001" src="" alt="">
                            </div>
                           
                            <a class="uppic-btn1 reupload-img1" href="javascript:$('#user-pic1').uploadify('cancel','*');" style="background-color: #348FD4;display:block;text-align: center;color: #FFFFFF; clear:left">重新上传</a>
                        </div>
                <!--     </form> -->
                       
                        <!-- <a href="javascript:;" id="addCoverPic" class="fl n_btn30gr_b"><span>添加图片</span></a>
                        <input type="hidden" name="cover" id="cover" value="">
                        <span class="fl" id="form_tips_cover"></span> -->
                    </div>
                </div>
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>课程标签：</span>
                    </div>
                    <div class="form_field">
                        <div class="pr">
                            <textarea class="textarea500 fl" style="height:60px;width:750px" prompt="掌握的技能、学到的知识点" id="knowledge" name="tag" placeholder="每个标签之间请以逗号隔开"><?php echo ($courseInfo['tagcontent']); ?></textarea>
                            <span id="form_tips_knowledge"></span>
                        </div>
                    </div>
                </div>
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>课程简介：</span>
                    </div>
                    <div class="form_field">
                        <div  class="pr">
                            <textarea class="textarea500 fl" style="height:60px;width:750px" prompt="掌握的技能、学到的知识点" id="knowledge" name="introduction"><?php echo ($courseInfo['introduction']); ?></textarea>
                            <span id="form_tips_knowledge"></span>
                        </div>
                    </div>
                </div>
                 <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>增值服务：</span>
                    </div>
                    <div class="form_field" >
                        <div class="pr" >
                            <input type="text" class="form_text fl" prompt="专长" id="" value="<?php echo ($courseInfo['service']); ?>" name="service" style="width:750px" placeholder="">
                           <!--  <span class="fr form_des pt10">已输入 <em id="briefCount">0</em>/最多输入 20000</span>
                            <span id="autoSaveTips" style="display:none" class="clear fr form_des pt10">编辑框信息已于<em></em>自动保存 <a id="autoSaveBrief" href="javascript:;">读取存档</a></span> -->
                        </div>
                    </div>
                </div>
                 <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>回放类型：</span>
                    </div>
                    <div class="form_field" >
                        <div class="pr" >
                            <input type="text" class="form_text fl" prompt="专长" id="" value="<?php echo ($courseInfo['playbacktype']); ?>"  name="playbacktype" style="width:750px" placeholder="">
                           <!--  <span class="fr form_des pt10">已输入 <em id="briefCount">0</em>/最多输入 20000</span>
                            <span id="autoSaveTips" style="display:none" class="clear fr form_des pt10">编辑框信息已于<em></em>自动保存 <a id="autoSaveBrief" href="javascript:;">读取存档</a></span> -->
                        </div>
                    </div>
                </div>
                <!-- =E formItem -->
                
                <!-- <div class="formItem">
                    <div class="form_label">
                        <span>学校自有分类：</span>
                    </div>
                    <div class="form_field">
                        <div class="mr20 fl" style="height:30px;visibility:visable;">
                            <select id="customParentType" style="display:none;">
                                <option value="0" selected="selected">- 选择一级分类 -</option>
                                                                <option value="26205">PHP课程</option>
                                                                <option value="26206">工具类</option>
                                                                <option value="26207">Mysql</option>
                                                                <option value="26208">HTML+CSS</option>
                                                            </select>
                        </div>
                        <div class="fl" style="height:30px;">
                            <select id="customSubType" style="display:none;">
                                <option value="0">- 选择二级分类 -</option>
                            </select>
                        </div>
                    </div>
                </div>
                                                
                <div class="formItem">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>担保期：</span>
                    </div>
                    <div class="form_field">
                        <input type="text" id="vodExpires" name="vodExpires" value="15" class="form_text fl">
                        <span class="ml5 fl">天</span>
                        <span class="fl" id="form_tips_vodExpires"></span>
                        <p class="form_des cl pt10">不能小于15天，担保期内学生的付款由百度传课托管，担保期过后，款项将自动转入校长支付账号。<a target="_blank" href="http://www.chuanke.com/?mod=help&do=showInfo&SID=211&HID=20&PID=346">了解详情&gt;&gt;</a></p>
                    </div>
                </div>
                <div class="formItem" id="singleBuyHtml">
                    <div class="form_label">
                        <i class="red">*</i>
                        <span>单节课购买：</span>
                    </div>
                    <div class="form_field">
                        <div class="fl">
                            <input type="radio" class="" name="singleBuy" value="1" checked="checked"><span class="mr20 ml5">不允许</span>
                            <input type="radio" class="" name="singleBuy" value="2"><span class="mr20 ml5">允许</span>
                            <span class="">单节课价格<input type="text" class="form_text ml5 mr5" name="singlePrice" id="singlePrice" disabled="disabled" style="width:70px">元</span>
                        </div>
                        <span class="" id="form_tips_singlePrice"></span>
                        <p class="form_des cl pt10">允许单节课购买后，学生可以购买课程中的任意一节或多节课程。</p>
                    </div>
                </div> -->
                <div class="clear clearfix"></div>
                <div class="formItem pb10">
                    <div class="form_label">&nbsp;</div>
                    <div class="form_field">
                        <input type="submit" class="n_btn38g submit" value="保存">
                    </div>
                </div>
                <div class="clear"></div>
            </form>
        </div>
    </div>
    <div style="display:none;">
<script src="/kx/Public/Js/ckpv.js" language="javascript"></script>
<!-- <script type="text/javascript" src="/kx/Public/Js/ThinkBox/ckpv.js"></script> -->

</div>
<script>
 // $(function(){
    // $("#expiretimeTips").inputTips();
    // $("#studentlimitTips").inputTips();
    // $("#TeacherBriefTips").inputTips();
    // var SID = 4013097,
    //  CacheParentType = "",
    //  CacheSubType = "",
    //  CourseID = false,
    //  IsAuthorize = 0,    //任命发课
    //  IsRecreate = false,     //重新发布
    //  ClassroomLimit = 200;
    //  $("#customParentType").val(0);
    // var custom_type = eval('({"26205":{"TypeID":"26205","SID":"4013097","PID":"0","Level":"1","Name":"PHP\u8bfe\u7a0b","SortID":"1"},\"26206\":{"TypeID":"26206","SID":"4013097","PID":"0","Level":"1","Name":"\u5de5\u5177\u7c7b","SortID":"2"},\"26207\":{"TypeID":"26207","SID":"4013097","PID":"0","Level":"1","Name":"Mysql","SortID":"3"},\"26208\":{"TypeID":"26208","SID":"4013097","PID":"0","Level":"1","Name":"HTML+CSS","SortID":"4","SubType":[{"TypeID":"26209","SID":"4013097","PID":"26208","Level":"2","Name":"","SortID":"1"}]}})');
    //          var SchoolTrialStatus = 1;
    // })
    </script>
<script src="/kx/Public/Js/plugins/My97DatePicker/WdatePicker.js"></script>
<!-- <script charset="utf-8" src="/js/editor/kindeditor-min.js"></script>
<script charset="utf-8" src="/js/editor/lang/zh_CN.js"></script>
<script src="http://res.ckimg.com/lib/jquery/plugin/jquery.uploadify-3.1.js" type="text/javascript"></script> -->

<script type="text/javascript" src="/kx/Public/Js/post-dev.js"></script>


<div class=" koo_bg_gray pt20">
    <div class="w980 mauto">
        <div class="copy-right w980 mauto ft14">
            <ul>
                <li><a href="http://www.koo.cn/gb/aboutus/" rel="nofollow">关于我们</a></li>
                <li><a href="http://www.koo.cn/gb/join/" rel="nofollow">人员招聘</a></li>
                <li><a href="http://www.koo.cn/gb/contact/" rel="nofollow">联系我们</a></li>
                <li><a href="http://www.koo.cn/help/learn/1/" rel="nofollow">帮助中心</a></li>
                <li class="info gray w320">
                    <p>酷学网&nbsp; 收获每一课 京ICP备05067669号-4</p>
                    <p>北京新东方教育科技（<span title="14-wwwb">集团</span>）有限公司 版权所有</p>
                </li>
            </ul>
        </div>
    </div>
    <!--[if IE]>
    <script type="text/javascript" src="http://images.koolearn.com/www/subject/kuxue/js/jquery.placeholder.js"></script>

    <![endif]-->
    <!--[if lt IE 7]>
    <script type="text/javascript" src="http://images.koolearn.com/www/subject/script/json2.min.js"></script>

    <![endif]-->

    <!-- Baidu Button BEGIN -->
    <!--<script src="customer_files/bds_s_v2.js" type="text/javascript" id="bdshare_js" data="type=slide&amp;img=0&amp;pos=right&amp;uid=324170"></script>-->
    <!--<script type="text/javascript" src="/kx/Public/Js/bds_s_v2.js"></script>-->

    <script type="text/javascript">
    //     $(function(){
    //         var bds_config = {"bdTop":283,'snsKey':{'tsina':'3297384058','tqq':'ba36faf481494730bccc2c58de9f6cf9'}};
    //         $("#bdshell_js").attr("src","http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000));
    //     })
   </script>
    <!-- Baidu Button END -->


    <script src="/kx/Public/Js/koolearnCollection.js" id="__sprout_main__" conf="http://images.koolearn.com/www/subject/script/kuxueConf.js"></script>
    <script type="text/javascript" src="/kx/Public/Js/kuxue-tongji.js"></script>

    <script type="text/javascript" src="/kx/Public/Js/cookie.js"></script>

   <script>
    //     $(function(){
    //         $('.zb_lst2 li:nth-child(3n)').css('margin-right','0');
    //         hrefIdCookie(["a_id","kid"]);
    //     })
 </script>



</div>


<div id="koo-go-top" class="">
    <a href="http://weibo.com/koocn" class="weibo"></a>
    <a href="javascript:void(0);" class="weixin pos_r"><img src="/kx/Public/Images/towcode.png" alt="" height="220" width="231"></a>
    <a href="http://bbs.koo.cn/f-86-1.html" class="message"></a>
    <a href="http://www.koo.cn/app" class="telphone"></a>
    <a href="javascript:void(0);" target="_blank" onclick="doyoo.util.openChat('g=10055922&amp;command=robotChat'); return false;" class="aq"></a>
    <a href="javascript:void(0);" onclick="return false" class="to-top  cursor" style="display: none;"></a>
</div>
<div style="position: fixed; top: 120px; right: 5px; color: rgb(0, 0, 0); font-size: 12px;" id="doyoo_panel">

</div>
<div style="background: transparent url(&quot;http://static.soperson.com/131221/../default/images/monitor/m_bg_1.gif?131127&quot;) no-repeat scroll 0% 0%; width: 429px; height: 196px; position: fixed;" id="doyoo_monitor">
    <div id="doyoo_mon_innner" style="position:relative;width:100%;height:100%;-webkit-transform: translateZ(0px)">
        <div style="cursor: move;" id="doyoo_mon_head">在线客服</div>
        <div id="doyoo_mon_main">同学您好，目前新旧系统交替，可能无法及时回复您的对话，如有问题可拨打4006762300按2咨询，给您造成的不便，请谅解！</div>
        <div id="doyoo_mon_foot">
            <a style="background-image: url(&quot;http://static.soperson.com/131221/../default/images/monitor/acc_sc.gif?131127&quot;);" id="doyoo_mon_accept" class="doyoo_mon_btn" href="javascript:;" onclick="doyoo.util.openChat();doyoo.util.accept();return false;"></a>
            <a style="background-image: url(&quot;http://static.soperson.com/131221/../default/images/monitor/phone_sc.gif?131127&quot;); display: none;" id="doyoo_mon_phone" class="doyoo_mon_btn" href="javascript:;" onclick="doyoo.util.openPhone();doyoo.util.accept();return false;"></a>
            <div style="background-image: url(&quot;http://static.soperson.com/131221/../default/images/monitor/dn_sc.gif?131127&quot;);" id="doyoo_mon_refuse" class="doyoo_mon_btn">

            </div>
        </div>
    </div>
    <div id="doyoo_mon_closer">

    </div>
</div>
<!-- <div id="doyoo_share" style="">

    <iframe src="about:blank" id="shareWrapper"></iframe>
</div> -->

<img id="uuidimg" src="/kx/Public/Images/__ktm.gif">


</body>
</html>
<script type="text/javascript">
    $(function(){
        //上传头像(uploadify插件)
        $("#user-pic").uploadify({
            'queueSizeLimit' : 1,
            'removeTimeout' : 0.5,
            'preventCaching' : true,
            'multi'    : false,
            'swf'           : '/kx/Public/Js/uploadify-v3.1/uploadify.swf',
            'uploader'      : "<?php echo U('Index/Course/uploadImg');?>",
            'buttonText'    : '<i class="userup-icon"></i>上传头像',
            'width'         : '200',
            'height'        : '200',
            'fileTypeExts'  : '*.jpg; *.png; *.gif;',
            'formData' :    { 'uid' : '<?php echo (session('uid')); ?>' },
            'onUploadSuccess' : function(file, data, response){
                //调试语句
                $('#isteacher').val(1);
                
                console.log(data);

                
                var data = $.parseJSON(data);
                
                if(data['status'] == 0){
                    $.ThinkBox.error(data['info'],{'delayClose':3000});
                    return;
                }
                var preview = $('.upload-area').children('#preview-hidden');
                preview.show().removeClass('hidden');
                //两个预览窗口赋值
                $('.crop').children('img').attr('src',data['path']+'?random='+Math.random());
                //隐藏表单赋值
                $('#img_src').val(data['path']);
                //绑定需要裁剪的图片
                var img = $('<img />');
                preview.append(img);
                preview.children('img').attr('src',data['path']+'?random='+Math.random());
                var crop_img = preview.children('img');
                crop_img.attr('id',"cropbox").show();
                var img = new Image();
                img.src = data['path']+'?random='+Math.random();
                //根据图片大小在画布里居中
                img.onload = function(){
                    var img_height = 0;
                    var img_width = 0;
                    var real_height = img.height;
                    var real_width = img.width;
                    if(real_height > real_width && real_height > 200){
                        var persent = real_height / 200;
                        real_height = 200;
                        real_width = real_width / persent;
                    }else if(real_width > real_height && real_width > 200){
                        var persent = real_width / 200;
                        real_width = 200;
                        real_height = real_height / persent;
                    }
                    if(real_height < 200){
                        img_height = (200 - real_height)/2;
                    }
                    if(real_width < 200){
                        img_width = (200 - real_width)/2;
                    }
                    preview.css({width:(200-img_width)+'px',height:(200-img_height)+'px'});
                    preview.css({paddingTop:img_height+'px',paddingLeft:img_width+'px'});
                }
                //裁剪插件
                $('#cropbox').Jcrop({
                    bgColor:'#333',   //选区背景色
                    bgFade:true,      //选区背景渐显
                    fadeTime:1000,    //背景渐显时间
                    allowSelect:false, //是否可以选区，
                    allowResize:true, //是否可以调整选区大小
                    aspectRatio: 1,     //约束比例
                    minSize : [100,100],//可选最小大小
                    boxWidth : 200,     //画布宽度
                    boxHeight : 200,    //画布高度
                    onChange: showPreview,//改变时重置预览图
                    onSelect: showPreview,//选择时重置预览图
                    setSelect:[ 0, 0, 100, 100],//初始化时位置
                    onSelect: function (c){ //选择时动态赋值，该值是最终传给程序的参数！
                        $('#x').val(c.x);//需裁剪的左上角X轴坐标
                        $('#y').val(c.y);//需裁剪的左上角Y轴坐标
                        $('#w').val(c.w);//需裁剪的宽度
                        $('#h').val(c.h);//需裁剪的高度
                  }
                });
                //提交裁剪好的图片
                $('.save-pic').click(function(){
                    if($('#preview-hidden').html() == ''){
                        $.ThinkBox.error('请先上传图片！');
                    }else{
                        //由于GD库裁剪gif图片很慢，所以长时间显示弹出框
                        $.ThinkBox.success('图片处理中，请稍候……',{'delayClose':30000});
                        $('#pic').submit()
                    }
                });
                //重新上传,清空裁剪参数
                var i = 0;
                $('.reupload-img').click(function(){
                    $('#preview-hidden').find('*').remove();
                    $('#preview-hidden').hide().addClass('hidden').css({'padding-top':0,'padding-left':0});
                });
            }
        });
        //预览图
        function showPreview(coords){
            var img_width = $('#cropbox').width();
            var img_height = $('#cropbox').height();
              //根据包裹的容器宽高,设置被除数
            var rx = 100 / coords.w;
            var ry = 100 / coords.h;
              $('#crop-preview-100').css({
                width: Math.round(rx * img_width) + 'px',
                height: Math.round(ry * img_height) + 'px',
                marginLeft: '-' + Math.round(rx * coords.x) + 'px',
                marginTop: '-' + Math.round(ry * coords.y) + 'px'
              });
              rx = 60 / coords.w;
              ry = 60 / coords.h;
              $('#crop-preview-60').css({
                width: Math.round(rx * img_width) + 'px',
                height: Math.round(ry * img_height) + 'px',
                marginLeft: '-' + Math.round(rx * coords.x) + 'px',
                marginTop: '-' + Math.round(ry * coords.y) + 'px'
              });
        }
    })

</script>


<script type="text/javascript">
    $(function(){
        //上传封面(uploadify插件)
        $("#user-pic1").uploadify({
            'queueSizeLimit' : 1,
            'removeTimeout' : 0.5,
            'preventCaching' : true,
            'multi'    : false,
            'swf'           : '/kx/Public/Js/uploadify-v3.1/uploadify.swf',
            'uploader'      : "<?php echo U('Index/Course/uploadImgCourse');?>",
            'buttonText'    : '<i class="userup-icon1"></i>上传封面',
            'width'         : '315',
            'height'        : '200',
            'fileTypeExts'  : '*.jpg; *.png; *.gif;',
            'formData' :    { 'uid' : '<?php echo (session('uid')); ?>' },
            'onUploadSuccess' : function(file, data, response){
                //调试语句
               $('#ispicture').val(1);
                console.log(data);
                
                var data = $.parseJSON(data);
                
                if(data['status'] == 0){
                    $.ThinkBox.error(data['info'],{'delayClose':3000});
                    return;
                }
                var preview = $('.upload-area1').children('#preview-hidden1');
                preview.show().removeClass('hidden1');
                //两个预览窗口赋值
                $('.crop1').children('img').attr('src',data['path']+'?random='+Math.random());
                //隐藏表单赋值
                $('#img_src1').val(data['path']);
                //绑定需要裁剪的图片
                var img = $('<img />');
                preview.append(img);
                preview.children('img').attr('src',data['path']+'?random='+Math.random());
                var crop_img = preview.children('img');
                crop_img.attr('id',"cropbox1").show();
                var img = new Image();
                img.src = data['path']+'?random='+Math.random();
                //根据图片大小在画布里居中
                img.onload = function(){
                    var img_height = 0;
                    var img_width = 0;
                    var real_height = img.height;
                    var real_width = img.width;
                    if(real_height > real_width && real_height > 200){
                        var persent = real_height / 200;
                        real_height = 200;
                        real_width = real_width / persent;
                    }else if(real_width > real_height && real_width > 315){
                        var persent = real_width / 315;
                        real_width = 315;
                        real_height = real_height / persent;
                    }
                    if(real_height < 200){
                        img_height = (200 - real_height)/2;
                    }
                    if(real_width < 315){
                        img_width = (315 - real_width)/2;
                    }
                    preview.css({width:(315-img_width)+'px',height:(200-img_height)+'px'});
                    preview.css({paddingTop:img_height+'px',paddingLeft:img_width+'px'});
                }
                //裁剪插件
                $('#cropbox1').Jcrop({
                    bgColor:'#333',   //选区背景色
                    bgFade:true,      //选区背景渐显
                    fadeTime:1000,    //背景渐显时间
                    allowSelect:false, //是否可以选区，
                    allowResize:true, //是否可以调整选区大小
                    aspectRatio: 1.57,     //约束比例
                    minSize : [145,92],//可选最小大小
                    boxWidth : 400,     //画布宽度
                    boxHeight : 200,    //画布高度
                    onChange: showPreview,//改变时重置ss预览图
                    onSelect: showPreview,//选择时重置预览图
                    setSelect:[ 0, 0, 145, 92],//初始化时位置
                    onSelect: function (c){ //选择时动态赋值，该值是最终传给程序的参数！
                        $('#x1').val(c.x);//需裁剪的左上角X轴坐标
                        $('#y1').val(c.y);//需裁剪的左上角Y轴坐标
                        $('#w1').val(c.w);//需裁剪的宽度
                        $('#h1').val(c.h);//需裁剪的高度
                  }
                });
                //提交裁剪好的图片
                $('.save-pic1').click(function(){
                    if($('#preview-hidden1').html() == ''){
                        $.ThinkBox.error('请先上传图片！');
                    }else{
                        //由于GD库裁剪gif图片很慢，所以长时间显示弹出框
                        $.ThinkBox.success('图片处理中，请稍候……',{'delayClose':30000});
                        $('#pic1').submit()
                    }
                });
                //重新上传,清空裁剪参数
                var i = 0;
                $('.reupload-img1').click(function(){
                    $('#preview-hidden1').find('*').remove();
                    $('#preview-hidden1').hide().addClass('hidden1').css({'padding-top':0,'padding-left':0});
                });
            }
        });
        //预览图
        function showPreview(coords){
            var img_width = $('#cropbox1').width();
            var img_height = $('#cropbox1').height();
              //根据包裹的容器宽高,设置被除数
            var rx = 146 / coords.w;
            var ry = 92 / coords.h;
              $('#crop-preview-1001').css({
                width: Math.round(rx * img_width) + 'px',
                height: Math.round(ry * img_height) + 'px',
                marginLeft: '-' + Math.round(rx * coords.x) + 'px',
                marginTop: '-' + Math.round(ry * coords.y) + 'px'
              });
              rx = 60 / coords.w;
              ry = 60 / coords.h;
              $('#crop-preview-601').css({
                width: Math.round(rx * img_width) + 'px',
                height: Math.round(ry * img_height) + 'px',
                marginLeft: '-' + Math.round(rx * coords.x) + 'px',
                marginTop: '-' + Math.round(ry * coords.y) + 'px'
              });
        }
    })

</script>

 <script>
    $(function(){
        $('.submit').click(function(event) {
            // 阻止表单默认提交事件
                event.preventDefault();
            var info = $("#create_course_basic_form").serialize();
            $.ajax({
                type: "post",
                async: false, //同步执行
                url: "<?php echo U('Index/Course/modify');?>",
                data: info,
                // dataType:'html',
                // traditional:true,
                success:function (msg) { 

                   alert(msg);   
                   if(msg == "修改成功"){
                        window.location.href = "<?php echo U('Index/Course/content');?>";
                   }   
                    

                },
                error: function () {
                    alert("网络连接错误，请稍后再试");
                }
            });
        });

    });
</script>